package com.hcf.admin.common.convention.exception;

import com.hcf.admin.common.convention.errorcode.BaseErrorCode;
import com.hcf.admin.common.convention.errorcode.IErrorCode;

public class ClientException extends AbstractException{

    public ClientException(IErrorCode code){
        this(code, null, null);
    }

    public ClientException(String message){
        this(BaseErrorCode.CLIENT_ERROR, null, message);
    }

    public ClientException(IErrorCode code, String message){
        this(code, null, message);
    }

    public ClientException(IErrorCode code, Throwable throwable, String message){
        super(code, throwable, message);
    }


    @Override
    public String toString() {
        return "ClientException{" +
                "code='" + code + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
